﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>What's New in the JDBC Driver</title>
    
    <link rel="stylesheet" type="text/css" href="../local/Classic.css">
      
    </link>
    
    <script src="../local/script.js">
      
    </script><script src="../local/script_main.js">&amp;nbsp;</script>
  </head>
  <body>
    <!--Topic built:03/05/2009 21:01:45-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="headerBold">What's New in the JDBC Driver</span>
          </td>
          <td align="right">
            
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      
        
        
		<font color="DarkGray"> </font> <p /> <p />
	
        <div id="introductionSection" class="section">
    <p>The following sections discuss new features in the Microsoft SQL Server JDBC Driver version 2.0.</p>
  </div><h1 class="heading">What's New in the JDBC Driver Version 2.0</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">This version 2.0 release of the Microsoft SQL Server JDBC Driver includes several new features and enhancements. </p>
    </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <h1 class="heading" xmlns="">Driver Name</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">The name of the JDBC driver no longer contains the version identifier of the SQL Server. As a result, the latest version of the JDBC driver is Microsoft SQL Server JDBC Driver version 2.0.</p>
        </content></div>
      <h1 class="heading" xmlns="">JDBC 4.0 Support</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">The JDBC driver version 2.0 now provides support for JDBC 4.0 API, which includes the following new features.</p>
          <ul xmlns=""><li>
              National Character Set API Support<br />
              The JDBC driver version 2.0 now includes new national character set conversion API methods. This support includes new setter, getter, and updater methods for <b>NCHAR</b>, <b>NVARCHAR</b>, <b>LONGNVARCHAR</b>, and <b>NCLOB</b> JDBC types. For more information, see <a href="4fceacfd-df4f-40cd-b7a2-5e5e58a5979f.htm">National Character Set Support</a>.<br />
              
              <br />
            </li><li>
              SQLXML Support<br />
              The JDBC Driver version 2.0 now provides support for the <b>SQLXML</b> data type. For more information on using <b>SQLXML</b>, see <a href="32b7217e-1f0c-473d-9a45-176daa81584e.htm">Supporting XML Data</a>.<br />
              
              <br />
            </li><li>
              SQLServerConnection createBlob, createClob, and createNClob Methods<br />
              The JDBC driver version 2.0 now enhances the <a href="937292a6-1525-423e-a2b2-a18fd34c2893.htm">SQLServerConnection</a> class by providing support for the creation of <b>BLOB</b>, <b>CLOB</b>, and <b>NCLOB</b> objects. For more information, see the <a href="630a93b0-6e3c-4255-a007-1097ce0ee243.htm">createBlob</a>, <a href="58b0865a-1cde-4046-9761-51e471294023.htm">createClob</a> and <a href="fa160884-394e-4fb2-a6e8-0437b81c149d.htm">createNClob</a> methods.<br />
              
              <br />
            </li><li>
              java.sql.Wrapper Interface<br />
              The JDBC driver version 2.0 supports the <b>java.sql.Wrapper</b> interface. This interface provides a mechanism to access extensions to the JDBC API that are specific to the Microsoft SQL Server JDBC Driver through a proxy interface. <br />
              The <b>java.sql.Wrapper</b> interface defines two methods: <b>isWrapperFor</b> and <b>unwrap</b>. The <b>isWrapperFor</b> method checks whether the specified input object implements this interface. The <b>unwrap</b> method returns an object that implements this interface to allow access to the Microsoft SQL Server JDBC Driver specific methods. <br />
              
              <br />
            </li><li>
              Other New JDBC 4.0 API Methods<br />
              The JDBC Driver version 2.0 now provides support for the following JDBC 4.0 methods:<br />
              <ul><li>
                  SQLServerConnection: <a href="3b0a8bbf-9369-4456-9ab8-1434ccacdd7e.htm">isValid</a>, <a href="241536e1-fae6-4980-85a5-d8cfcd50b8bd.htm">getClientInfo</a>, and <a href="9eaafb0e-8bfa-456c-a481-8e06e5d539e1.htm">setClientInfo</a>.<br />
                </li><li>
                  SQlServerDatabaseMetadata: <a href="1739ecb5-e5cb-4807-b5a8-97c0299929d0.htm">autoCommitFailureClosesAllResultSets</a>, <a href="1568aef4-f4c4-40a0-a1ab-9c106905bd92.htm">getClientInfoProperties</a>, <a href="e2b0e0f7-717c-48e6-bcd2-a325d938a833.htm">getFunctionColumns</a>, <a href="44335cbd-c84d-4ef3-a6a1-fca7eb7ec768.htm">getFunctions</a>, <a href="317c0b44-fe3f-4142-9cab-e40e4c4fe070.htm">getRowIdLifetime</a>, <a href="672171ac-976f-4605-9bee-2a5e141d92cb.htm">getSchemas</a>, and <a href="0e5c0579-84b5-4717-b128-0bcd512f6022.htm">supportsStoredFunctionsUsingCallSyntax</a>.<br />
                </li><li>
                  SQLServerStatement: <a href="e79b5b53-16b0-42a3-be4e-542a77a21e12.htm">isClosed</a> method.<br />
                </li><li>
                  SQLServerCallableStatement: Overloaded <a href="8de3ae7c-ba7b-4249-8333-71c8416b3bb7.htm">setAsciiStream</a>, <a href="567297bf-5bec-46ae-8264-29639b9b4a06.htm">setBinaryStream</a>, <a href="3b4c3234-09f6-44fa-9757-0a20ca90e13e.htm">setCharacterStream</a>, <a href="218ff486-3f31-49e4-ad81-a423246a8307.htm">setBlob</a>, <a href="222ea248-1185-4c33-ae10-5158bf3f6430.htm">setClob</a> methods, and <a href="6207ad4b-56b3-4c66-bad5-6e590591ac2f.htm">getCharacterStream</a> method.<br />
                </li><li>
                  SQLServerPreparedStatement: Overloaded <a href="91df14fb-ff92-457f-ad51-50da7a254630.htm">setAsciiStream</a>, <a href="fd6be063-08eb-40cf-9201-5a9f62387726.htm">setBinaryStream</a>, <a href="fe13326b-799d-4bf3-b4f1-32ab1841d0ed.htm">setCharacterStream</a>, <a href="218ff486-3f31-49e4-ad81-a423246a8307.htm">setBlob</a>, and <a href="1b148388-01a8-4e2e-bc72-470ce29164de.htm">setClob</a> methods. <br />
                </li><li>
                  SQLServerResultSet: <a href="6081aa34-fc88-4dd0-9a3f-05e8488219dc.htm">isClosed</a>, <a href="4508d90f-c3c4-4eac-8001-fb0b93b66734.htm">getHoldability</a>, overloaded <a href="4959a0a9-ae55-4c4e-80a8-21119aaceb92.htm">updateAsciiStream</a>, <a href="1af26ac2-76e5-4a26-a600-9919211333ba.htm">updateBinaryStream</a>, <a href="78e367c6-5e4d-4715-8cb7-e841e4f76a7c.htm">updateBlob</a>, <a href="78f39ec7-e27c-4534-bb19-fae806afd08c.htm">updateCharacterStream</a>, and <a href="e841f9a6-e94f-4552-a0e2-aefe3d84faf0.htm">updateClob</a> methods.<br />
                </li></ul>
            </li></ul>
        </content></div>
      <h1 class="heading" xmlns="">JDBC 3.0 Jar and JDBC 4.0 Jar</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">The JDBC Driver version 2.0 provides two class library files, <b>sqljdbc.jar</b> and <b>sqljdbc4.jar</b>, to be used depending on your preferred Java Runtime Environment (JRE) settings.</p>
          <p xmlns="">
            <b>sqljdbc.jar</b> class library provides support for JDBC 3.0 and requires a Java Runtime Environment (JRE) of version 5.0. <b>sqljdbc4.jar</b> class library provides support for JDBC 4.0 and requires a Java Runtime Environment (JRE) of version 6.0 or later. <b>sqljdbc4.jar</b> includes all of the features of the <b>sqljdbc.jar</b> as well as the new JDBC 4.0 methods. For more information about which JAR file to choose, see <a href="447792bb-f39b-49b4-9fd0-1ef4154c74ab.htm">System Requirements for the JDBC Driver</a>.</p>
          <div style="margin: .5em 1.5em .5em 1.5em" xmlns=""><b>Important: </b>
            The JDBC Driver version 2.0 does not support JRE 1.4.<p />
          </div>
        </content></div>
      <h1 class="heading" xmlns="">sendStringParametersAsUnicode Connection Property</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">For optimal performance with the CHAR, VARCHAR, and LONGVARCHAR JDBC data types, an application using the version 2.0 of the JDBC driver should set the <b>sendStringParametersAsUnicode</b> connection property to "false" and use non-national character methods. For more information about the sendStringParametersAsUnicode connection property, see <a href="f1b62700-f046-488d-bd6b-a5cd8fc345b7.htm">Setting the Connection Properties</a>.</p>
        </content></div>
      <h1 class="heading" xmlns="">loginTimeout Connection Property</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">Starting with JDBC driver version 2.0, the default value of <b>loginTimeout</b> connection property is 15 seconds. In the version 1.2 release, the default value was 0. For more information about the loginTimeout connection property, see <a href="f1b62700-f046-488d-bd6b-a5cd8fc345b7.htm">Setting the Connection Properties</a>.</p>
        </content></div>
      <h1 class="heading" xmlns="">Enhanced Tracing Driver Operation</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">This version of the JDBC Driver enhances tracing the driver operation by logging public methods’ entry and exit points and providing better distinction between the trace levels. For more information, see <a href="723aeae7-6504-4585-ba8b-3525115bea8b.htm">Tracing Driver Operation</a>. </p>
        </content></div>
      <h1 class="heading" xmlns="">Default Behavior of Adaptive Buffering</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">Starting with JDBC driver version 2.0, the default response buffering behavior of the driver is "<b>adaptive.</b>" This means that in order to get the adaptive buffering behavior, your application does not have to request the adaptive behavior explicitly. In the version 1.2 release, the buffering mode was "<b>full</b>" by default and the application had to request the adaptive buffering mode explicitly. If you want to keep the version 1.2 default behavior in your application, you must set the responseBufferring connection propery to "<b>full</b>". For more information about adaptive buffering, see <a href="92d4e3be-c3e9-4732-9a60-b57f4d0f7cb7.htm">Using Adaptive Buffering</a>. </p>
        </content></div>
      <h1 class="heading" xmlns="">Collation Support</h1><div id="sectionSection" class="section" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <p xmlns="">In JDBC Driver version 2.0, the driver supports all the collations supported by SQL Server 2000, SQL Server 2005, and the new collations or new versions of Windows collation names introduced in SQL Server 2008. For more information, see <a href="bbb74a1d-9278-401f-9530-7b5f45aa79de.htm">International Features of the JDBC Driver</a>.</p>
        </content></div>
    </sections></div><span id="seeAlsoSpan"><h1 class="heading">See Also</h1></span><div id="seeAlsoSection" class="section" name="collapseableSection"><a href="939a8773-2583-49a4-bf00-6b892fbe39dc.htm">Overview of the JDBC Driver</a><br /><br /></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]-->
      <div id="footer" class="section">
        
		<hr />
		
		<span id="fb" class="feedbackcss">
			
			
		</span>
		
		<a href="9bad553b-9e70-4696-8499-2e35f772a1e0.htm">
			
			© 2009 Microsoft Corporation. All rights reserved.
		</a>
 	
	
      </div>
    </div>
  </body>
</html>